<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登录</title>
<link rel="stylesheet" type="text/css" href="resources/css/nav.css">
<style type="text/css">
body{
	background: #f5f5f5;

}
.wrap{
	width: 100%;
	height: 100%;
}
.loginbg{
	background-color: #fff;
    width: 800px;
    margin: 10% auto;
    position: relative;
    min-height: 520px;
}
.logoimg{
	text-align: center;
}
.logoimg img{
	margin-top: 60px;
}
.loginbg h1{
	font-size: 18px;
	text-align: center;
	margin-top: 40px;
}
.errorMsg{
	text-align: center;
	color: red;
	margin-top: 20px;
	font-size: 18px;
}
#loginBox{
    margin-top: 25px;
    text-align: center;
}
#username,#password{
	padding: 8px;
	height: 30px;
	font-size: 18px;
	width: 360px;
}
#password{
	margin-top: 20px;
}
#loginbutton{
	margin-top: 20px;
	background-color: #3185e8;
	width: 380px;
	height: 45px;
	border: 0;
	font-size: 16px;
	cursor:pointer;
}
.registe-psw{
	text-align: center;
	margin-top: 30px;
}
.registe-psw a{
	color: #757575;
	width: 100px;
	padding: 0 9px;
}
.registe-psw a:hover{
	color: #f44;
}
</style>
</head>
<body>
<div class="wrap">
	<div class="loginbg">
		<div class="logoimg"><img src="resources/images/logo.jpg" alt="logo"></div>
		<p class="errorMsg">${errorMsg}</p>
		<form action="" method="post" id="loginBox" onsubmit="return check(this)">
			<ul>
				<li><input type="text" name="username" id="username" placeholder="用户名"></li>
				<li><input type="password" name="password" id="password" placeholder="密码"></li>
				<li><input type="submit" name="submit" value="立即登陆" id="loginbutton"/></li>
			</ul>
		</form>
		<div class="registe-psw">
			<a href="registe">注册账号</a><span>|</span><a href="">忘记密码？</a>
		</div>	
	</div>
</div>
<script type="text/javascript"> 
function check(form) {   
	if (form.username.value == "") {   
		alert("用户名不能为空");   
		return false;    
	}    
	if (form.password.value == "") {    
		alert("密码不能为空");    
		return false;    
	} 
	return true;    
}
</script>
</body>
</html>